package com.mx.config;

import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.actuate.health.Status;
import org.springframework.stereotype.Component;

import com.mx.controller.FirstController;

/**
 * @author mengbin
 * @date 2018年7月7日 下午2:50:57
 */
@Component
public class MyHealthIndicator implements HealthIndicator {
    @Override
    public Health health() {
        return new Health.Builder(FirstController.isHealth ? Status.UP : Status.DOWN).build();
    }

}
